package ac.github.os.internal.core.condition.impl.common

import ac.github.os.internal.core.condition.Condition
import ac.github.os.internal.core.config.StringConfig
import ac.github.os.internal.core.config.get
import ac.github.os.internal.session.Session
import taboolib.common.platform.Awake
import taboolib.common.platform.function.info

@Awake
class EqualsCondition : Condition {

    override fun doScreen(session: Session, config: StringConfig): Boolean {
        val v1 = config.get<String>("v1") ?: return false
        val v2 = config.get<String>("v2") ?: return false
        return (v1 == v2)
    }

    override val namespace: String
        get() = "equals"
}